package com.woniuxy02;

/**
 * @author 作者
 * @create 2025-06-04 11:05
 */
public class Test04 {
    public static void main(String[] args) {
//        String s1=null;
//        System.out.println(s1);
//        System.out.println(s1.toString());
        String s1="";
        System.out.println(s1);
        System.out.println(s1.toString());
        String s2=new String();
        System.out.println(s2);
        System.out.println(s2.toString());

        String s3=new String("abc");
        byte[] bytes={97,98};
        char[] chars={'a','b',99};
        String s4=new String(chars);
        String s5=new String(bytes);
        System.out.println(s3);
        System.out.println(s4);
        System.out.println(s5);
//        char[] chars2={'a','b',99};
//        System.out.println(new String(chars2));
        System.out.println(new String(new char[]{'a','b',99},0,2));
    }

}
